package io.jt808.proto.item;


import io.norland.buffer.AutoBuffer;
import io.norland.proto.IProto;

public class PositionAdditional25Signal implements IProto {
    private int signal;

    public byte[] writeToBytes() {
        AutoBuffer buffer = new AutoBuffer();
        buffer.writeInt(this.signal);
        return buffer.array();
    }

    public void readFromBuf(AutoBuffer buffer) {
        this.signal = buffer.readInt();
    }

    public String getSignalType() {
        switch (signal) {
            case 0:
                return "近光灯信号";
            case 1:
                return "远光灯信号";
            case 2:
                return "右转向灯信号";
            case 3:
                return "左转向灯信号";
            case 4:
                return "制动信号";
            case 5:
                return "倒档信号";
            case 6:
                return "雾灯信号";
            case 7:
                return "示廓灯";
            case 8:
                return "喇叭信号";
            case 9:
                return "空调状态";
            case 10:
                return "空挡信号";
            case 11:
                return "缓速器工作";
            case 12:
                return "ABS 工作";
            case 13:
                return "加热器工作";
            case 14:
                return "离合器状态";
            default:
                return "";
        }
    }
}